<?php
/**
 * 商会通讯录模块定义
 *
 * @author zh0537cn
 * @url http://s.we7.cc/
 */
defined('IN_IA') or exit('Access Denied');

global $_W, $_GPC;

load()->func('tpl');
$opp = 'message';
$uniacid = $_W['uniacid'];

$deat = pdo_fetch("SELECT * FROM " . tablename('bbyscm_card_message') . ' where `uniacid`=:uniacid limit 1', array(':uniacid' => $uniacid));

if (checksubmit('submit')) {
    $data['template1'] = $_GPC['template1'];
	$data['template2'] = $_GPC['template2'];
	$data['template3'] = $_GPC['template3'];
	$data['template4'] = $_GPC['template4'];
	$data['template5'] = $_GPC['template5'];
    $data['template6'] = $_GPC['template6'];
	$data['template7'] = $_GPC['template7'];
	$data['template8'] = $_GPC['template8'];
 if (empty($deat)) {
	 
        $data['uniacid'] = $uniacid;
		
        pdo_insert('bbyscm_card_message', $data);
		
    } else {
		
        pdo_update('bbyscm_card_message', $data, array('uniacid' => $uniacid));
		
    }
    message('更新参数设置成功！', 'refresh');
}

include $this->template('web/message');
